import { EntitySchema } from '@mikro-orm/core';

export class ImsYzdKpCourseLiveChat {
  id!: number;
  courseId!: number;
  userId!: number;
  user?: unknown;
  type!: number;
  content!: unknown;
  uniacid!: number;
  time!: string;
  size?: unknown;
}

export const ImsYzdKpCourseLiveChatSchema = new EntitySchema({
  class: ImsYzdKpCourseLiveChat,
  properties: {
    id: { primary: true, type: 'number' },
    courseId: { type: 'number', index: 'course_id' },
    userId: { type: 'number', index: 'user_id' },
    user: { type: 'unknown', columnType: 'longtext', nullable: true },
    type: { type: 'number', index: 'type' },
    content: { type: 'unknown', columnType: 'longtext' },
    uniacid: { type: 'number', index: 'uniacid' },
    time: { type: 'string', length: 255 },
    size: { type: 'unknown', columnType: 'longtext', nullable: true },
  },
});
